<template>
  <div>
    <!-- 1.将表单设置为一个子组件,表单内要有用户名和密码
         2.提交按钮
     -->
    <Username ref="sonForm"> </Username>
    <button @click="sumbit">提交</button>
  </div>
</template>
<script>
import Username from './components/form.vue'

export default {
  props: {},
  data() {
    return {}
  },
  components: {
    Username,
  },
  methods: {
    sumbit() {
      this.$refs.sonForm.sonSubmit()
    },
  },
}
</script>
<style scoped lang="less"></style>
